<template>
  <div id="sidebar">
    <div v-if="userInfo.accesstoken" class="panel">
      <div class="header">
        <span class="col_fade">个人信息</span>
      </div>
      <div class="inner">
        <div class="user_card">
          <div>
            <NuxtLink class="user_avatar" :to="'/user/'+userInfo.loginname">
              <img :src="userInfo.avatar_url" title="webPan">
            </NuxtLink>
            <span class="user_name"><a class="dark" href="/user/webPan">{{userInfo.loginname}}</a></span>
            <div class="space clearfix"></div>
            <span class="signature"> “世上无难事，只怕有心人。”</span>
          </div>
        </div>
      </div>
    </div>
    <div v-if="userInfo.accesstoken" class="panel">
      <div class="inner">
        <NuxtLink to="/topic/create" id="create_topic_btn">
          <span class="span-success">发布话题</span>
        </NuxtLink>
      </div>
    </div>
    <div class="panel">
      <div class="header">
        <span class="col_fade">友情社区</span>
      </div>
      <div class="inner">
        <ol class="friendship-community">
          <li>
            <a href="https://ruby-china.org/" target="_blank">
              <img src="//static2.cnodejs.org/public/images/ruby-china-20150529.png">
            </a>
          </li>
          <div class="sep10"></div>
          <li>
            <a href="http://golangtc.com/" target="_blank">
              <img src="//static2.cnodejs.org/public/images/golangtc-logo.png">
            </a>
          </li>
          <div class="sep10"></div>
          <li>
            <a href="http://phphub.org/" target="_blank">
              <img src="//static2.cnodejs.org/public/images/phphub-logo.png">
            </a>
          </li>
        </ol>
      </div>
    </div>
    <div class="panel">
      <div class="header">
        <span class="col_fade">客户端二维码</span>
      </div>
      <div class="inner cnode-app-download">
        <img width="200" src="//static.cnodejs.org/FtG0YVgQ6iginiLpf9W4_ShjiLfU">
        <br>
        <a href="https://github.com/soliury/noder-react-native" target="_blank">客户端源码地址</a>
      </div>
    </div>

  </div>
</template>

<script>
  import {mapGetters} from 'vuex'
  export default {
    name: "Aside.vue",
    computed:{
      ...mapGetters({
        userInfo:'user/userInfo'
      })
    }
  }
</script>

<style scoped>

</style>
